<!DOCTYPE html >
<!--  Website template by freewebsitetemplates.com  -->
<html>
 <%@ page import="java.sql.*" %>
<head>
	<title>Cs</title>
	<meta  charset=iso-8859-1" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<!--[if IE 6]>
		<link href="css/ie6.css" rel="stylesheet" type="text/css" />
	<![endif]-->
	<!--[if IE 7]>
        <link href="css/ie7.css" rel="stylesheet" type="text/css" />  
	<![endif]-->
</head>

<body>

	  
			<div id="header">
	           		<a href="index.html" id="logo"><img src="images/logo.gif" width="310" height="72" alt="" title=""></a>
					<ul class="navigation">
						<li ><a href="index.html">Home</a></li>
						<li class="active"><a href="provider.jsp">Upload</a></li>
						
						
						<li ><a href="provider3.jsp">Download</a></li>
						<li><a href="index.html">Logout</a></li>
					</ul>
			</div>
			
			<div id="body">
			<% Object rid;
			 rid=session.getAttribute("eid");
			 
			
			String date=null,sname=null,sid=null,mid=null;
			sname=(String) session.getAttribute("eid");
			
				//contents=new String(content);
				
			
				

			%>
			
			       <div id="content">
				        
						 
						 <div class="search">
						 
						 <form name="form" method="post" action="login" onsubmit="return validateForm()">
						 <table><tr><td>
									
									</td><td></td></tr>
									</table> </form>
								</div>
								
				        <div class="content7">
						
														<div style="width:670px;height:auto;float:left; border-radius:5px; padding-right:10px;padding-left:10px;padding-bottom:10px;padding-top:30px;margin-left:10px;margin-top:10px;margin-bottom:10px;border:1px solid #00cc00";>


<!--table start-->
<div class="admintablegenerator" ><font color="green" size="5px";>File Download</font><br /><br />
                <table >
                    <tr >
                   
                        <td>
                          FILE NAME
                        </td>
                       
                        
                       
                       
                       
                        
                       
                        <td >
                          TO Download
                        </td>
                        
                    </tr>
                    
                    
                    <%
                    try {
        				ResultSet rs;
        				 
        				 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        				  java.sql.Connection conn=DriverManager.getConnection("jdbc:odbc:encrypt","sa","test");
        				String sql = "select * from message where sid='"+sname+"' ORDER BY id DESC" ;
        				
        				Statement s = conn.createStatement();
        				s.executeQuery (sql);
        				rs = s.getResultSet();
        				int id;
        				while (rs.next())
        				{
        					id=rs.getInt("id");
        					mid=Integer.toString(id);
        					System.out.println(mid);
        					sname=rs.getString("filename");
        					//sid=rs.getString("sid");
        					
                   
        					
        					
        				%> 
                    
                    
                    <tr >
                        
                        <td>
                          <%=sname%>
                        </td>
                        
                        
                         
                        <td>
                          <a href="provider4.jsp?mid=<%=mid%>">Click Here To Download..</a>
                        </td>
                         
                          </tr>
                        
                        <%}rs.close ();
                        System.out.println("hai1"+mid);
                       // System.out.println("hai"+sid);
                       
        				s.close ();
    				}catch(Exception e){
    				System.out.println("Exception is ;"+e);
    				}
        				%>
                  
                   
                   
                </table>
                </div>



</div>
						</div>
						
					  
					 
		       
				
			    <div id="sidebar">
						
                     								
						 
						
						
			    </div>
				
					  
				   </div>
				  
				  
			
			</div>
			
			
			
	
</body>
</html>